package com.woniuxy.moneyapp.client;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniuxy.commons.util.Result;
import com.woniuxy.moneyapp.client.param.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;


@FeignClient(value = "fund",path = "/fundPath",contextId = "CashRecordClient")
@Component
//第一个是context path 第二个是
public interface CashRecordClient {

    @ApiOperation("新增交易流水记录")
    @PostMapping("/cashRecord/addCashRecord")
    Result addCashRecord(@RequestBody @Valid CashRecordInfo cashRecord);

    @ApiOperation("查询交易流水记录")
    @PostMapping("/cashRecord/cashRecord")
    Result<Page<CashDtoToShow>> cashRecord(@RequestBody @Valid CashRecordForm cashRecordForm);
}
